<template>
  <div class="hello">
    <van-notice-bar
      left-icon="volume-o"
      mode="closeable"
      scrollable
      text="与君远相知，不道云海深。欢迎来到哈密瓜哈哈的网站"
    />
    <div class="navtop">2024,让我们一起重新出发</div>
    <div class="navbottom">
      <div class="bottom">
        <img alt="Vue logo" @click="openPopup" src="../assets/导航.svg" />
      </div>
      <div id="haomiao">浩渺行无极，扬帆但信风</div>
      <!-- eslint-disable-next-line prettier/prettier -->
      <img src="../assets/sss.svg" style="width: 24px; height: 24px; margin-right: 7px" 
      alt="" />
    </div>
    <!-- 图标位置 -->
    <van-popup
      v-model="showPopup"
      closeable
      lock-scroll:false
      duration="0.3"
      :get-container="getContainer"
      close-icon-position="top-left"
      position="left"
      :style="{ width: '50%', height: '100%' }"
    >
      <div class="my-container" style="padding-top: 33px; padding-left: 20px">
        <h3>哈哈哈哈哈</h3>
        <a href="http://www.baidu.com">点我去百度</a>
      </div>
    </van-popup>

    <!-- 导航结束 -->
    <!-- banner开始 -->
    <div class="banner">
      <div class="bannerlist"></div>
      <div class="bannerlist1"></div>
    </div>
    <div class="banner-con">
      <ul>
        <li><a href="http://www.lemon183.cn">文章</a></li>
        <li><a href="">故事</a></li>
        <li><a href="">笔记</a></li>
      </ul>
    </div>
    <div class="read-list">
      <div class="read-list-img read-list-img-1"></div>
      <div class="read-list-r">
        <li>
          <a href="">
            <div class="h4">
              <h4>树莓派的基本使用</h4>
              <div class="time">2024-01-25</div>
            </div>
            <p>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;选择合适的导航可以让用户在产品的使用过程中非常流畅，相反若是不合适就会引起用户操作不适（方向不明确），以下是「侧栏导航」和
              「顶部导航」的区别
            </p>
          </a>
          <div class="icon">
            <div class="icon-pp">#树莓派</div>
            <div class="icon-kk">
              <img src="../assets/dianzan.svg" alt="" />
              <div class="count">999</div>
            </div>
          </div>
        </li>
      </div>
    </div>
    <div class="read-list">
      <div class="read-list-img read-list-img-2"></div>
      <div class="read-list-r">
        <li>
          <a href="">
            <div class="h4">
              <h4>树莓派的基本使用</h4>
              <div class="time">2024-01-25</div>
            </div>
            <p>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;选择合适的导航可以让用户在产品的使用过程中非常流畅，相反若是不合适就会引起用户操作不适（方向不明确），以下是「侧栏导航」和
              「顶部导航」的区别
            </p>
          </a>
          <div class="icon">
            <div class="icon-pp">#树莓派</div>
            <div class="icon-kk">
              <img src="../assets/dianzan.svg" alt="" />
              <div class="count">999</div>
            </div>
          </div>
        </li>
      </div>
    </div>
    <div class="read-list">
      <div class="read-list-img read-list-img-3"></div>
      <div class="read-list-r">
        <li>
          <a href="">
            <div class="h4">
              <h4>树莓派的基本使用</h4>
              <div class="time">2024-01-25</div>
            </div>
            <p>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;选择合适的导航可以让用户在产品的使用过程中非常流畅，相反若是不合适就会引起用户操作不适（方向不明确），以下是「侧栏导航」和
              「顶部导航」的区别
            </p>
          </a>
          <div class="icon">
            <div class="icon-pp">#树莓派</div>
            <div class="icon-kk">
              <img src="../assets/dianzan.svg" alt="" />
              <div class="count">999</div>
            </div>
          </div>
        </li>
      </div>
    </div>

    <!-- 分页开始 -->
    <van-pagination
      v-model="currentPage"
      :total-items="125"
      :show-page-size="3"
      force-ellipses
    />
    <!-- 分页结束 -->
    <!-- footer开始 -->
    <div class="footer">
      <!-- <div class="footer-con">
        <div class="ftop">技术支持： VictorLemon</div>
        <img src="../assets/github-fill.svg" alt="" />
      </div> -->
      <div class="footer-ban">
        <div class="ban-p1">雨浸风蚀的落寞与仓楚一定是水</div>
        <div class="ban-p1">静静地流过青春奋斗的日子和触摸理想的岁月</div>
        <div class="ban-p1">—— 路遥</div>
      </div>
      <div class="foot-iconqq">
        <img src="../assets/weixin_1.svg" alt="" />
        <img src="../assets/QQ.svg" alt="" />
      </div>
      <div class="foot-iconchat">
        <div class="iconchat-list">
          <img src="../assets/o.png" alt="" />
          <p>微信联系</p>
        </div>
        <div class="iconchat-list">
          <img src="../assets/oo.png" alt="" />
          <p>站长qq</p>
        </div>
      </div>
      <div class="footer-con">
        <div class="ftop">技术支持： VictorLemon</div>
        <img src="../assets/github-fill.svg" alt="" />
      </div>
      <audio id="myAudio" src="../assets/mysoul.mp3" autoplay></audio>
      <van-button type="primary" @click="playAudio" size="mini"
        >播放</van-button
      >
      <van-button type="primary" @click="pauseAudio" size="mini"
        >暂停</van-button
      >
      <van-button shape="circle" size="small" icon="play" class="play-button"
        >撒娇的</van-button
      >
    </div>
  </div>
</template>

<script>
export default {
  name: "HelloWorld",
  props: {
    msg: String,
  },
  data() {
    return {
      showPopup: false,
    };
  },
  methods: {
    openPopup() {
      this.showPopup = true;
    },
    getContainer() {
      return document.querySelector(".my-container");
    },
    playAudio() {
      var audio = document.getElementById("myAudio"); // 获取音频元素
      audio.play();
    },
    pauseAudio() {
      var audio = document.getElementById("myAudio"); // 获取音频元素
      audio.pause();
    },
  },
  // mounted() {
  //   this.playAudio();
  // },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
/* 导航区域开始 */
a {
  text-decoration: none;
  list-style: none;
}
.hello {
  max-width: 540px;
  min-width: 320px;
  margin: 0 auto;
  font: normal 16px/1.5 PingFangSC-regular, Tahoma, Lucida Grande, Verdana,
    Microsoft Yahei, STXihei, hei;
  color: #000;
}

.hello .navtop {
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #000;
  background-color: #fff;
}
.hello .navbottom {
  margin: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* font-size: 22px; */
  color: #000;
  background-color: #fff;
}
#haomiao {
  font-size: 19px;
  font-weight: 600;
  font-family: STSong, STSongti-SC-Regular, serif;
  color: #00a9ff;
  background-color: #fff;
}

/* 导航结束 */

/* banner开始 */
.banner {
  width: 100%;
  height: 130px;
  display: flex;
  justify-content: space-around;
}
.banner .bannerlist {
  display: flex;
  width: 48%;
  border-radius: 12px;
  text-align: center;
  background: url(../assets/88.jpg) no-repeat center;
  background-size: cover;
  background-color: #00a9ff;
}
.banner .bannerlist1 {
  display: flex;
  width: 48%;
  border-radius: 12px;
  text-align: center;
  background: url(../assets/45.jpg) no-repeat center;
  background-size: cover;
}
/* 字体 */
@font-face {
  font-family: "PangMenZhengDao";
  src: url("@/assets/Pang.ttf") format("truetype");
}
/* 字体旁门 */
.navtop {
  color: #ccc;
  font-family: "PangMenZhengDao", Arial, sans-serif;
}
/* banner-con */
.banner-con ul {
  width: 100%;
  display: flex;
  height: 40px;
}
.banner-con ul li {
  width: 20%;
  text-align: center;
  line-height: 40px;
  font-size: 18px;
  font-family: STSong, STSongti-SC-Regular, serif;
  font-weight: 600;
  color: #00a9ff;
}
.banner-con ul li a {
  color: #00a9ff;
}
.read-list {
  width: 100%;
  display: flex;
  height: 144px;
  background-color: #fff;
}
.read-list .read-list-img {
  width: 48%;
  margin: 9px 0px 9px 0px;
  margin-left: 5px;
  /* background: url(../assets/45.jpg) no-repeat center;
  background-size: contain; */
}
.read-list-img-1 {
  /* background-color: #ccc; */
  background: url(../assets/45.jpg) no-repeat center;
  background-size: cover;
  border-radius: 10px;
}
.read-list-img-2 {
  background: url(../assets/100.jpg) no-repeat center;
  background-size: cover;
  border-radius: 10px;
}
.read-list-img-3 {
  background: url(../assets/99.jpg) no-repeat center;
  background-size: cover;
  border-radius: 10px;
}

/* .read-list:nth-child(2) .read-list-img {
  width: 43%;
  height: 100%;
  border-radius: 20px;
  margin-left: 5px;
  background: url(../assets/45.jpg) no-repeat center !important;
  background-size: contain;
} */
.read-list-r {
  width: 56%;
  height: 93%;
  margin: 5px;
  /* background-color: pink; */
}
.read-list-r li {
  display: flex;
  padding: 5px;
  flex-direction: column;
}
timee .read-list-r li .h4 {
  display: flex;
  justify-content: space-between;
}
.read-list-r li .h4 .time {
  font-size: 10px;
  color: #12a182;
  font-weight: 600;
}
.read-list-r li h4,
p {
  margin: 0;
  padding: 0;
}
.read-list-r li h4 {
  font-size: 15px;
  text-align: left;
  color: #000;
}
.read-list-r li p {
  width: 82%;
  font-size: 11px;
  display: -webkit-box;
  -webkit-line-clamp: 4; /* 你可以根据需要调整这个值 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #5e6d82;
  text-overflow: ellipsis;
}
.read-list-r li .icon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  height: 23px;
}
.read-list-r li .icon .icon-pp {
  width: 50%;
  background-color: #e16c96;
  border-radius: 10px;
}
.read-list-r li .icon .icon-kk {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30%;
  font-size: 18px;
  height: 23px;
  line-height: 23px;
}
.read-list-r li .icon .icon-kk img {
  width: 22px;
  height: 22px;
  margin-right: 0px;
}
.read-list-r li .icon .icon-kk .count {
  font-size: 15px;
  color: #93b5cf;
}
/* footer开始 */
.footer {
  margin-top: 10px;
  height: 430px;
}
.footer .footer-con {
  width: 100%;
  height: 28px;
  font-size: 25px;
  color: #5e6d82;
  display: flex;
  font-family: "PangMenZhengDao", Arial, sans-serif;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding-top: 18px;
}
.footer .footer-ban {
  /* margin-top: 10px; */
  padding-top: 15px;
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: #fff;
}
.footer .footer-ban .ban-p1 {
  font-size: 16px;
  color: #ccc;
  font-family: SimSun, STSong, STSongti-SC-Regular, serif;
  font-weight: 700;
}
.footer .footer-ban .ban-p1:nth-child(3) {
  margin-top: 5px;
  width: 80%;
  text-align: end;
}
.footer .foot-iconqq {
  display: flex;
  justify-content: space-around;
  width: 50%;
  height: 30px;
  margin: 0 auto;
  background-color: #fff;
}
.footer .foot-iconchat {
  display: flex;
  width: 280px;
  height: 150px;
  margin: 0 auto;
  background-color: #fff;
}
.footer .foot-iconchat .iconchat-list {
  margin: 0 auto;
  height: 150px;
  width: 30%;
  display: flex;
  flex-direction: column;
  align-content: center;
  justify-content: center;
}
.play-button {
  position: fixed;
  bottom: 100px;
  right: 3px;
  margin: 10px;
  z-index: 999;
}
</style>
